#pragma once

#include "tinyxml.h"
#include "../../../include/type.h"
#include "../../../include/matrix4.h"
#include "../../../include/axisalignedbox.h"

class TiXmlUtility
{
public:
	//parse value
	static Common::Matrix4 ReadMatrix( TiXmlHandle ptrDataSec );
	static void WriteMatrix( const Common::Matrix4& matrix, TiXmlNode* pDataSec );

	static void WritePlane( const Common::Plane& rPlane, TiXmlNode* pDataSec );
	static Common::Plane ReadPlane( TiXmlHandle ptrDataSec );

	static Common::AxisAlignedBox ReadAABB( TiXmlHandle ptrDataSec );
	static void WriteAABB( const Common::AxisAlignedBox& rBB, TiXmlNode* pDataSec );
	
	static Common::Vector3 StringToVector3( const String& strValue );
	static String Vector3ToString( const Common::Vector3& vValue);
	
	static Common::Vector4 StringToVector4( const String& strValue );
	static String Vector4ToString( const Common::Vector4& vValue);
	 
	static String FloatToString( Real Value );
	static Real StringToFloat( String strValue );
};
